package xyz.ddlnt.model.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author ZZULI_SE 210910
 * @data 2025/4/26 22:56
 */
@Schema(description = "帖子信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Post {
    @Schema(description = "帖子id")
    private Long id;
    @Schema(description = "用户 id")
    private Long userId;

    @Schema(description = "帖子标题")
    private String postTitle;
    @Schema(description = "帖子标签")
    private String tags;
    @Schema(description = "帖子摘要")
    private String summary;
    @Schema(description = "帖子目录（JSON数组）")
    private String postDirectory; // JSON 类型
    @Schema(description = "帖子内容")
    private String postContent;

    @Schema(description = "帖子的前节点（帖子id，没有则为0）")
    private Long prevNodeId;
    @Schema(description = "前节点类型：0 无、1 试题、2 帖子")
    private Integer prevNodeType;
    @Schema(description = "帖子的子节点（帖子id数组）")
    private String childNodes; // JSON 类型

    @Schema(description = "浏览人数")
    private Integer viewCount;
    @Schema(description = "点赞数")
    private Integer likeCount;
    @Schema(description = "收藏数")
    private Integer collectCount;
    @Schema(description = "评论数")
    private Integer commentCount;

    @Schema(description = "发布时间")
    private LocalDateTime publishTime;
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;
}
